import "./index.less"
import "./assets/0.jpg"
import "./assets/run.gif"
import "./index02.css"
console.log("index-->");

function sum (a, b) {
    return a + b;
}
var result = sum (12, 23);
console.log(result);


let litedemo = () => {
    console.log('测试箭头函数');
}

litedemo();

let promise = new Promise((resolve, reject) => {
    setTimeout(() => {
        resolve(12389);
    }, 1000);
});

promise.then(res => {
    console.log(res);
});

let sun = () => {
    console.log('sun');
};

sun();


import React from 'react';
import ReactDom from 'react-dom';
import { createRoot } from 'react-dom/client';
/*
ReactDom.render(
    <div>React项目演示</div>,
    document.getElementById('litedemo')
);*/

function MyBanner() {
    return <div>React项目演示-new</div>
};
createRoot(document.getElementById('litedemo')).render(<MyBanner/>);


import ComponentOne  from "./ComponentOne" ;
import ComponentTwo from "./ComponentTwo";
import ShoppingList from "./ComponentList.js";
import BcosDemo from "./BcosDemo";
createRoot(document.getElementById('component1')).render(<ComponentOne/>);
//createRoot(document.getElementById('component2')).render(<ComponentTwo/>);
createRoot(document.getElementById('component2')).render(<ShoppingList/>);
createRoot(document.getElementById('bcosdemo')).render(<BcosDemo/>);